//
//  ModifyPhotoFlowLayout.m
//  PigMarket
//
//  Created by Felix on 2019/3/19.
//  Copyright © 2019 felix.pigmarket.oc. All rights reserved.
//

#import "ModifyPhotoFlowLayout.h"

@implementation ModifyPhotoFlowLayout

- (instancetype)init
{
    self = [super init];
    if (self) {
        // 每个Cell大小 -1是用作1个像素的间距
        self.itemSize = CGSizeMake((SCREEN_WIDTH - 3 * 20)/2.0, (SCREEN_WIDTH - 3 * 20)/2.0);
        // 每行的最小间距
        self.minimumLineSpacing = 20.0f;
        // 每列的最小间距，设置Cell的大小已经留出1个像素大小，所以此处设置0即可
        self.minimumInteritemSpacing = 20.0f;
        // CollectionView视图的/上/左/下/右,的边距
        self.sectionInset = UIEdgeInsetsMake(20, 20, 20, 20);
        self.scrollDirection = UICollectionViewScrollDirectionVertical;
    }
    return self;
}

@end
